<?php

/**
 * Sample backend page for demonstration of Mailfetcher usage.
 *
 * @author tobias.vogel
 */
class Page_Be_Mailfetcher extends Page {

	function __construct() {
		parent::__construct();
	}

	public function defaultAction() {
		
		$fetcher = new Mailfetcher_ImapRetriever();
		$fetcher->retrieveAllMailboxes();
		
		self::$TPL->setBodyTemplate('mailfetcher');
		self::$TPL->assign('messages', $fetcher->messages);
		
		return array(
			'type' => 'display'
		);
	}

}

